home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Utilities / Content Creation Tool Plug-Ins / Maya / Sources / DirectX.mel < prev    next >
Encoding:
Text File  |  2004-09-27  |  2.9 KB  |  136 lines

  1.  
  2. global string $g_dxMenu;
  3. global string $g_dxPreviewToggle;
  4. global string $g_dxSkinToggle;
  5.  
  6. {
  7.     DirectX_BuildMenu();
  8. }
  9.  
  10.  
  11.  
  12. global proc int DirectX_GetPreviewState()
  13. {
  14.     global string $g_dxPreviewToggle;
  15.  
  16.     int $result= `menuItem -q -checkBox  $g_dxPreviewToggle`;
  17.  
  18.     return $result;
  19. }
  20.  
  21.  
  22. global proc int DirectX_GetSkinState()
  23. {
  24.     global string $g_dxSkinToggle;
  25.  
  26.     int $result= `menuItem -q -checkBox  $g_dxSkinToggle`;
  27.  
  28.     return $result;
  29. }
  30.  
  31. global proc DirectX_RemoveMenu()
  32. {
  33.     global string $g_dxMenu;
  34.  
  35.     if(`menu -q -exists $g_dxMenu`)
  36.         deleteUI $g_dxMenu;
  37.  
  38. }
  39.  
  40. global proc DirectX_BuildMenu()
  41. {
  42.     global string $gMainWindow;
  43.     global string $g_dxMenu;
  44.     global string $g_dxPreviewToggle;
  45.     global string $g_dxSkinToggle;
  46.     global string $g_dxAnimationToggle;
  47.  
  48.     // If menu exists or if main window doesn't exist, just return.
  49.     if(`menu -q -exists $g_dxMenu` 
  50.       || !(`window -q -exists $gMainWindow`)) 
  51.         return;
  52.  
  53.     $g_dxMenu= `menu -parent $gMainWindow -tearOff true -aob true 
  54.                     -label "DirectX"`;
  55.  
  56.     setParent -m $g_dxMenu;
  57.  
  58.     $g_dxPreviewToggle= `menuItem -l "Realtime Previewing"
  59.         -annotation "Realtime Previewing of scene in Direct3D viewers."
  60.         -cb 1
  61.         -c ("DXCCPreviewToggle `menuItem -q -cb $g_dxPreviewToggle`")`;
  62.  
  63.     $g_dxSkinToggle= `menuItem -l "Capture Skin"
  64.         -annotation "Capture Pre-skinned mesh + skinning information."
  65.         -cb 0
  66.         -c ("DXCCRebuildScene")`;
  67.  
  68.     menuItem -d true;
  69.  
  70.     menuItem -l "Rebuild All"
  71.         -annotation "Rebuild scene data for realtime viewers and export"
  72.         -c "DXCCRebuildScene"
  73.         dxRebuildSceneItem;
  74.  
  75.     menuItem -l "Rebuild Selected"
  76.         -aob true
  77.         -annotation "Rebuild selected data for realtime viewers and export"
  78.         -c ("DXCCRebuildSelected")
  79.         dxRebuildSelectedItem;
  80.  
  81.     menuItem -l "Gather Animation"
  82.         -annotation "Gather Animation"
  83.         -c ("DXCCGatherAnimation");
  84.  
  85.     menuItem -d true;
  86.     
  87.     menuItem -l "Export All"
  88.         -annotation "Export the scene to an X-File."
  89.         -c ("DXCCExportScene")
  90.         dxExportSceneItem;
  91.  
  92.     //menuItem -l "Export Selected"
  93.     //    -aob true
  94.     //    -annotation "Export the selected items and dependencies to an X-File."
  95.     //    -c ("DXCCExportSelected")
  96.     //    dxExportSelectedItem;
  97.  
  98.     menuItem -d true;
  99.  
  100.     menuItem  -l "Viewers..." 
  101.                 -sm 1 
  102.                 -to 1
  103.             -annotation "Realtime Viewers"
  104.             dxViewerItem;
  105.  
  106.     menuItem  -l "Floating" 
  107.             -annotation "Floating Viewers"
  108.             -c "DXCCFloatingView"
  109.             dxFloatingViewerItem;
  110.  
  111.     menuItem  -l "Top" 
  112.             -annotation "TopViewers"
  113.             -c "DXCCTopView"
  114.             dxTopViewerItem;
  115.  
  116.     menuItem  -l "Side" 
  117.             -annotation "SideViewers"
  118.             -c "DXCCSideView"
  119.             dxSideViewerItem;
  120.  
  121.     menuItem  -l "Front" 
  122.             -annotation "FrontViewers"
  123.             -c "DXCCFrontView"
  124.             dxFrontViewerItem;
  125.  
  126.     menuItem  -l "Perspective" 
  127.             -annotation "PerspectiveViewers"
  128.             -c "DXCCPerspectiveView"
  129.             dxPerspectiveViewerItem;
  130.  
  131.     menuItem -d true;
  132.  
  133. }
  134.  
  135.  
  136.